import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginView.vue'),
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('../views/HomeView.vue'),
    },
    {
      path: '/recommend',
      name: 'recommend',
      component: () => import('../views/RecommendView.vue'),
    },
    {
      path: '/bookshelf',
      name: 'bookshelf',
      component: () => import('../views/BookshelfView.vue'),
    },
    {
      path: '/my',
      name: 'my',
      component: () => import('../views/MyView.vue'),
    },
    {
      path: '/my-recommend',
      name: 'my-recommend',
      component: () => import('../views/MyRecommendView.vue'),
    },
    {
      path: '/my-like',
      name: 'my-like',
      component: () => import('../views/MyLikeView.vue'),
    },
    {
      path: '/book-detail',
      name: 'book-detail',
      component: () => import('../views/BookDetailView.vue'),
    },
  ],
})

export default router
